#!/bin/bash
BASE_HOME=`/usr/bin/dirname "$0"`
FILE_NAME=`basename "$0"`
PROCESS_ID="$$"
CONF_FILE="${BASE_HOME}/mysql_config.list"
##load mysql config file mysql_config.list
while read line; do
    eval $line
done < ${CONF_FILE}


#create logfile path if not exists
LOGFILE_PATH=`echo ${LOGFILE%/*}`
if [ ! -d ${LOGFILE_PATH} ]; then
                mkdir -p  ${LOGFILE_PATH} 
fi

##record scripts running logs
exec >> ${LOGFILE} 2>&1

echo "`date +'%F %T'`|${FILE_NAME}|${PROCESS_ID}|[info]keepalived switch status by notify and running"

echo "`date +'%F %T'`|${FILE_NAME}|${PROCESS_ID}|[info]keepalived switch status $1 $2 $3 "
